<?php 
include ('classes/page.class1.php');
include ('functions/le-format.php');
include ('functions/convert-characters.php'); 
$Favourites = new Page; 
$filename = "textfiles/Favourites.txt"; 

$file_handle = fopen("textfiles/Favourites.txt", "rb");

while (!feof($file_handle) ) {
  $line_of_text = fgets($file_handle);
  $links = explode('|', $line_of_text);
  $link = $links[1]; 
  //echo $links[1]. "<BR>";
}
fclose($file_handle);

if (file_exists($filename)) { 
  $file_contents = file_get_contents($filename); 
  $file_contents = autop($file_contents, 0);  
  $file_contents = convert_chars($file_contents, 0); 
  $output = $file_contents; 
} else { 
 $output = "<p>No content. The associated text file could not be found.</p>"; 
} 

$Favourites->Title = "Favourites"; 
$Favourites->MetaDescription = "Favourites"; 
$Favourites->MetaKeywords = "Favourites"; 
$Favourites->ThisPage = "Favourites"; 
$Favourites->SetContent($output); 
$Favourites->Template(); ?>